<?php
/**
 * Created by PhpStorm.
 * User: kkw
 * Date: 2019/1/27
 * Time: 17:41
 */
namespace kkw\goods\table;

use suda\archive\Table;

class GoodsImgTable extends  Table
{
    public function __construct()
    {
        parent::__construct('goods_img');
    }

    protected function onBuildCreator($table)
    {
        return $table->fields([
            $table->field('id', 'bigint', 20)->primary()->unsigned()->auto()->comment("商品图片的id"),
            $table->field('user_id', 'bigint', 20)->unsigned()->comment("用户的id"),
            $table->field('goods_id', 'bigint', 20)->unsigned()->comment("图片ID"),
            $table->field('path', 'varchar', 255)->comment("图片路径"),
        ]);
    }
}